package com.weic.easycache.access;

import java.io.IOException;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import java.util.Map;

import org.apache.http.conn.ConnectTimeoutException;

import com.weic.easycache.exception.ApiErrorException;
import com.weic.easycache.exception.HttpStatusException;
import com.weic.easycache.exception.ApiStatusException;

public interface INetAces {
	
	public interface Method {
        int DEPRECATED_GET_OR_POST = -1;
        int GET = 0;
        int POST = 1;
        int PUT = 2;
        int DELETE = 3;
    }
	
	String executeAccess(String url, String serviceName, int method, Map<String, String> headers,
			String[] paramNames, String[] paramValues) throws HttpStatusException,
			ApiStatusException, ApiErrorException, ConnectTimeoutException,
			SocketTimeoutException, UnknownHostException, IOException;
	
	Input getInputStream(String url, String serviceName, Map<String, String> headers,
			String[] paramNames, String[] paramValues) throws HttpStatusException,
			ConnectTimeoutException, SocketTimeoutException, UnknownHostException, IOException;
}
